package com.zy.oauth.controller;


import com.zy.common.core.R;
import com.zy.oauth.dto.pream.SystemsPagePream;
import com.zy.oauth.service.SystemsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@Api(tags = "系统", value = "系统")
@RestController
@RequestMapping("/system")
public class SystemsController {

    @Resource
    private SystemsService systemsService;

    @ApiOperation("获取全部系统")
    @GetMapping("/systemsAll")
    public R<?> systemsAll() {
        return R.ok(systemsService.all());
    }

    @ApiOperation("系统分页查询")
    @PostMapping
    public R<?> systemsPage(@RequestBody SystemsPagePream pream) {
        return R.ok(systemsService.page(pream));
    }
}
